﻿using Niknak.Services.TaskScheduler.Wcf;
using System;
using System.ServiceModel;

namespace Niknak.Services.TaskScheduler.Interfaces
{
    [ServiceContract(Namespace = "http://niknak.org/Services/TaskScheduler/v1")]
    public interface IWcfEndpoint
    {
        [OperationContract]
        string Ping();

        [OperationContract]
        Guid[] GetRunningTaskIds();

        [OperationContract]
        bool Reset();

        [OperationContract]
        bool Restart();

        [OperationContract]
        bool RaiseIterationCompletedEvent(Guid scheduledTaskId, DateTime iterationDate);

        [OperationContract]
        long GetServiceUptime();

        [OperationContract]
        long GetEndpointUptime();

        [OperationContract]
        string GetCustomEventLogName();

        [OperationContract]
        SerializableEventRecord[] ReadFromEventLog(string logName, ServiceCore.InternalEnums.EventLogLevel[] logLevels, string providerName, DateTime afterTimestamp, DateTime beforeTimestamp, int skip, int take);
    }
}
